import React, { Component } from 'react'
import './style.css'
import ComentSearch from './ComentSearch'
export default class ComentList extends Component {
  constructor() {
    super()
    this.state = {
      list:['读书','游戏','写字']
    }
  }
  render() {
    const {list} = this.state
    return (
      <div>
        <div className='comment'>
          {list.map((i,index)=>{
            return <p key={index} className='active'> {i}</p>
          })}
        </div>
        <ComentSearch list={list} />
      </div>
    )
  }
}
